import torchvision
from torch.utils.tensorboard import SummaryWriter

dataset_transform = torchvision.transforms.ToTensor()
train_set = torchvision.datasets.CIFAR10(root="../CIFAR10_dataset", train=True, transform=dataset_transform, download=True)
test_set = torchvision.datasets.CIFAR10(root="../CIFAR10_dataset", train=False, transform=dataset_transform, download=True)
# print(test_set[0])
# print(test_set.classes)
# image, target = test_set[0]
# image.show()
# print(target)
# print(test_set.classes[target])

Writer = SummaryWriter("P10")
for i in range(10):
    img,target=test_set[i]
    Writer.add_image("test_set",img,i)
Writer.close()
